#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main() {
    int num = 0;
    while (scanf("%d", &num) != EOF) {
        scanf("\n");
        int* arr = (int*)malloc(sizeof(int) * num);
        for (int i = 0; i < num; i++) {
            scanf("%d,", &arr[i]);
        }
        for (int i = num - 1; i >= 0; i--) {
            printf("%d", arr[i]);
            if (i != 0) {
                printf(" ");
            } else {
                printf("\n");
            }
        }
    }
    return 0;
}
